
<div class="one-register-box one-min-height">
  <div class="one-register-box-body">
    <form class="form form-horizontal"  [formGroup]="tplTemplateForm" >
      <div class="form-group">
        <label for="name" class="col-xs-3 control-label">模板名称:</label>
        <div class="col-xs-9">
          <input type="text" class="form-control" id="name" placeholder="模板名称" formControlName="name" required>
          <div *ngIf="formErrors.name" class="has-error">
            <label class="control-label"><i class="fa fa-times-circle-o"></i>{{formErrors.name}} </label>
          </div>
        </div>
      </div>

      <div class="form-group">
        <label for="template_add_useType" class="col-xs-3 control-label">应用类型:</label>
        <div class="col-xs-9">
          <!-- 下拉框 -->
          <select class="multiselect" class="form-control" id="template_add_useType" formControlName="useType" required>
            <option *ngFor="let useType of applicationTypeArr" [value]="useType.value" >{{useType.display}}</option>
          </select>
        </div>
      </div>

      <div class="form-group">
        <label for="templare_add_assembly" class="col-xs-3 control-label">模板组件:</label>
        <div class="col-xs-9">
          <textarea rows="2" cols="20" id="templare_add_assembly" style="width:100% "  placeholder="模板组件"  name="assembly" formControlName="assembly" maxlength="2500"></textarea>
          <div *ngIf="formErrors.assembly" class="has-error">
            <label class="control-label"><i class="fa fa-times-circle-o"></i>{{formErrors.assembly}} </label>
          </div>
        </div>
      </div>

      <div class="form-group">
        <label for="remark" class="col-xs-3 control-label">备注:</label>
        <div class="col-xs-9">
          <input type="text" class="form-control" id="remark" placeholder="备注" formControlName="remark" required >
          <div *ngIf="formErrors.remark" class="has-error">
            <label class="control-label"><i class="fa fa-times-circle-o"></i>{{formErrors.remark}} </label>
          </div>
        </div>

      </div>

      <div class="form-group">
        <label for="templare_add_describe" class="col-xs-3 control-label">描述:</label>
        <div class="col-xs-9">
          <textarea rows="2" cols="20" id="templare_add_describe" style="width:100%" placeholder="描述"  name="description" formControlName="description" maxlength="50"></textarea>
          <div *ngIf="formErrors.description" class="has-error">
            <label class="control-label"><i class="fa fa-times-circle-o"></i>{{formErrors.description}} </label>
          </div>
        </div>
      </div>
      <div class="form-group">
        <label class="col-xs-3 control-label">是否正式:</label>
        <div class="col-xs-9" >
          <div class="row">
            <div class="col-xs-4">
              <input type="radio" id="template_type_yes"   value="1" formControlName="type">
              <label for="template_type_yes">
                正式
              </label>
            </div>
            <div class="col-xs-4">
              <input type="radio" id="template_type_no" checked value="0" formControlName="type">
              <label for="template_type_no">
                测试
              </label>
            </div>
          </div>
        </div>
      </div>

      <div class="form-group">
        <label class="col-xs-3 control-label">是否启用:</label>
        <div class="col-xs-9" >
          <div class="row">
            <div class="col-xs-4">
              <input type="radio" id="template_isUse_yes"  value="1" formControlName="isUse">
              <label for="template_isUse_yes">
                启用
              </label>
            </div>
            <div class="col-xs-4">
              <input type="radio"  formControlName="isUse" id="template_isUse_no" checked value="0">
              <label for="template_isUse_no">
                禁用
              </label>
            </div>
          </div>
        </div>
      </div>

      <div class="pull-right">
        <button class="btn btn-default" type="button" (click)="cancel()">取消</button>
        <button class="btn btn-success" type="button"  [disabled]="tplTemplateForm.invalid" (click)="onSubmit()">提交</button>
      </div>
    </form>

  </div>
</div>
